using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Windows.Teste.AdaptaCodigo
{
    public partial class frmNovoParametro : Form
    {
        public ListViewItem item;

        public frmNovoParametro()
        {
            InitializeComponent();
        }

        private void cmdIncluir_Click(object sender, EventArgs e)
        {
            item = new ListViewItem();

            item.Text = txtNome.Text;

            ListViewItem.ListViewSubItem sValor = new ListViewItem.ListViewSubItem(item, txtValor.Text);

            item.SubItems.Add(sValor);

            this.DialogResult = DialogResult.OK;
        }

        private void cmdCancelar_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
    }
}